<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="css/index.css" />	
	<style>	
	</style>
</head>
<body>
<!-- <!-- 导航栏 --> 
	<div class="nav">
		<ul>
			<li classs="list" onmouseover="onOver(this)" onmouseout="onOut(this)"><a href="xiaofei.html" >
				消费级产品</a>
				<ul class="erji">
					<li><a href="#">御 Mavic 系列</a></li>
					<li><a href="#">御 Mavic 2</a></li>
					<li><a href="#">御 Mavic Air</a></li>
					<li><a href="#">御 Mavic Pro 铂金版</a></li>
					<li><a href="#">御 Mavic Pro</a></li>
				</ul>
			</li>
			<li classs="list" onmouseover="onOver(this)" onmouseout="onOut(this)">
				<a href="zhuanye.html">专业级产品</a>
				<ul class="erji">
					<li><a href="#">御 Mavic 系列</a></li>
					<li><a href="#">御 Mavic 2</a></li>
					<li><a href="#">御 Mavic Air</a></li>
					<li><a href="#">御 Mavic Pro 铂金版</a></li>
					<li><a href="#">御 Mavic Pro</a></li>
				</ul>
			</li>
			<li classs="list" onmouseover="onOver(this)" onmouseout="onOut(this)">
				<a href="hangye.html">行业应用</a>
				<ul class="erji">
					<li><a href="#">御 Mavic 系列</a></li>
					<li><a href="#">御 Mavic 2</a></li>
					<li><a href="#">御 Mavic Air</a></li>
					<li><a href="#">御 Mavic Pro 铂金版</a></li>
					<li><a href="#">御 Mavic Pro</a></li>
				</ul>
			</li>
			<li classs="list" onmouseover="onOver(this)" onmouseout="onOut(this)">
				<a href="xitong.html">系统模块</a>
				<ul class="erji">
					<li><a href="#">御 Mavic 系列</a></li>
					<li><a href="#">御 Mavic 2</a></li>
					<li><a href="#">御 Mavic Air</a></li>
					<li><a href="#">御 Mavic Pro 铂金版</a></li>
					<li><a href="#">御 Mavic Pro</a></li>
				</ul>
			</li>
			<li classs="list" onmouseover="onOver(this)" onmouseout="onOut(this)">
				<a href="404.html">探索精彩</a>
				<ul class="erji">
					<li><a href="#">御 Mavic 系列</a></li>
					<li><a href="#">御 Mavic 2	</a></li>
					<li><a href="#">御 Mavic Air</a></li>
					<li><a href="#">御 Mavic Pro 铂金版</a></li>
					<li><a href="#">御 Mavic Pro</a></li>
				</ul>
			</li>
			<li classs="list" onmouseover="onOver(this)" onmouseout="onOut(this)">
				<a href="404.html">服务与支持</a>
				<ul class="erji">
					<li><a href="#">御 Mavic 系列</a></li>
					<li><a href="#">御 Mavic 2</a></li>
					<li><a href="#">御 Mavic Air</a></li>
					<li><a href="#">御 Mavic Pro 铂金版</a></li>
					<li><a href="#">御 Mavic Pro</a></li>
				</ul>
			</li>
			<li class="login"><a href="login.html" id="login">登录</a></li>
			<li><a href="zhuce.html" id="login2">注册</a></li>
		</ul>
		<span class="use" id="user"></span>
		<a id="btn">退出登录</a>
	</div>
<!-- --------------------------轮播--------------------------------- -->
<iframe src="lunbo.html" frameborder="0" scrolling="no" class="my_lunbo"></iframe>
<!-- ------------内容--------------- -->
	<div class="content">
		<div class="con">
			<ul class="list">
				<li class="item">
					<img src="../img/content.jpg" alt="" />
						<p style="font-size:23px;" class="js">寂寞的赛车手©诗人隆多</p>
						<p class="ck">点击查看更多御 Mavic Pro</p>
				</li>
				<li class="item">
					<img src="img/content2.jpg" alt="" />
						<p style="font-size:23px;" class="js">同步©Andy Leclerc</p>
						<p class="ck">点击查看更多御 Mavic 2拍摄的作品</p>
				</li>
				<li class="item">
					<img src="img/content3.jpg" alt="" />
						<p style="font-size:23px;" class="js">跟随©Andy Leclerc</p>
						<p class="ck">点击查看更多精灵Phantom 4 Pro拍摄的作品</p>
				</li>
				<li class="item">
					<img src="img/content4.jpg" alt="" />
						<p style="font-size:23px;" class="js">雪者掠影©Andy Leclerc</p>
						<p class="ck">点击查看更多精灵Phantom 4 Pro拍摄的作品</p>
				</li>
				<li class="item">
					<img src="img/content5.jpg" alt="" />
						<p style="font-size:23px;" class="js">抓住心中所想©Andy Leclerc</p>
						<p class="ck">点击查看更多精灵Phantom 4 Pro拍摄的作品</p>
				</li>
			</ul>
			<button type="button" class="btn" id="gopre"><img src="img/arrow-left.png" alt="" /></button>
			<button type="button" class="btn" id="gonext"><img src="img/arrow-right.png" alt="" /></button>
		</div>
		<div class="dji">
			<img src="img/dji.jpg" alt="" />
			<p class="wenzi" style="font-size:30px;"><a href="#">DJI 带屏遥控器</a></p>
			<p class="wen"><a href="#">专为户外航拍设计</a></p>
		</div>
		<div class="ron">
			<img src="img/banner7.png" alt="" />
			<p class="wz" style="font-size:30px;color:#303233;">如影 RONIN-S</p>
			<p class="w" style="color:#303233;">由感于心，卓践于行</p>
		</div>
		<div class="zy">
			<img src="img/con1.png" alt="" />
			<p class="zy1" style="font-size:30px;color:#303233;">专业级产品</p>
			<p class="zy2" style="color:#303233;">大疆为专业影视制作而设计的拍摄设备</p>
		</div>
		<div class="hy">
			<img src="img/con2.jpg" alt="" />
			<p class="zy1" style="font-size:30px;color:#303233;">行业应用</p>
			<p class="zy2" style="color:#303233;">大疆为行业应用提供完备的数据分析以及解决方案</p>
		</div>
		<div class="foot">
			<div class="buy">
				<p class="qu">购买渠道</p>
				<p class="qu2">查找可靠的购买渠道</p>
			</div>
			<div class="buy2">
				<p class="qu">购买渠道</p>
				<p class="qu2">查找可靠的购买渠道</p>
			</div>
			<div class="buy3">
				<p class="qu">购买渠道</p>
				<p class="qu2">查找可靠的购买渠道</p>
			</div>
		</div>
	</div>
<!-- ---------------------底部-----------------------	 -->
<iframe src="footer.html" frameborder="0" scrolling="no" class="my_footer"></iframe>
</body>
<script>
	function onOver(obj){
		var ej=obj.getElementsByTagName("ul")
		ej[0].style.display="block";
	}
	function onOut(obj){
		var er=obj.getElementsByTagName("ul");
		er[0].style.display="none";
	}
//轮播JS代码
	var items=document.getElementsByClassName("item");
	var gopre=document.getElementById("gopre");
	var gonext=document.getElementById("gonext");
	var index=0;
	var time=0;
	var clearactive=function(){
		for(var i=0;i<items.length;i++){
			items[i].className="item";
		}
	}
	var goindex=function(){
		clearactive();
		items[index].className="item active";
	}
	var goNext=function(){
		if(index<4){
			index++;
		}else{
			index=0;
		}
		goindex();
	}
	gonext.addEventListener("click",function(){
		goNext();
	});
	var goPre=function(){
		if(index==0){
			index=4
		}else{
			index--;
		}
		goindex();
	}
	gopre.addEventListener("click",function(){
		goPre();
	})

	//获取登录用户名
function request(key) {
    var url =decodeURI(location.search); //获取url中"?"符后的字串
		console.log(url)
    var theRequest = {};
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {
            theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
        }
    }
    return theRequest[key] || null;
}
var name= request('name');
console.log(name)

var dl=document.getElementById("login");
var zc=document.getElementById("login2");
var user=document.getElementById("user");
if(request('name')!=null){
	zc.style.display="none";
	dl.style.display="none";
	user.innerHTML=`欢迎您&nbsp;`+request("name");
}else{
	user.style.display="none"
	btn.style.display="none"
}

btn.onclick=function(){
	user.style.display="none"
	zc.style.display="block";
	dl.style.display="block";
	btn.style.display="none"
}
</script>
</html>